import * as React from 'react';
import { DialogProps } from 'rc-dialog';
interface ImageItem {
  src: string;
  alt?: string;
}

type ImagesType = string[] | ImageItem[];

interface ToolsItem {
  icon: React.ReactNode;
  onClick: (e: React.MouseEventHandler) => void;
}

export interface ImgViewProps
  extends Omit<React.ImgHTMLAttributes<HTMLImageElement>, 'placeholder' | 'onClick'> {
  images: ImagesType | string | ImageItem;
}

export interface PreviewProps {
  images: ImagesType;
  extraTools?: ToolsItem[];
}

export interface FullScreenPreviewProps extends Omit<DialogProps, 'onClose'> {
  onClose?: (e: React.SyntheticEvent<Element>) => void;
  images: ImagesType;
}
